Skip to content

Port to 26.1-pre-1#65

Merged
LambdAurora merged 4 commits intoLambdAurora:26.1from
Ampflower:26.1
Mar 21, 2026
Merged

Port to 26.1-pre-1#65
LambdAurora merged 4 commits intoLambdAurora:26.1from
Ampflower:26.1

Conversation

@Ampflower
Copy link
Copy Markdown
Contributor

@Ampflower Ampflower commented Mar 12, 2026

This also has a side-commit of fixing the Neoforged Maven URI.

Various acknowledgements of subpars:

  • render* methods that overrode Vanilla have been renamed to extract*RenderState
    • This did not cover the whole API surface, as we'd like further input whether all remaining render* functions should follow the same convention of extract*RenderState or extractGui in the case of rendering a screen.
  • The NeoForge GUI render event hook has currently been commented out as it's unknown whether NeoForge will retain the same API name or use a new one. Given the hook is still named from MCP, it's quite likely it'll still be the same and the comment can be merely removed. But as there's no production NeoForge yet, it cannot be tested.
  • GuiGraphicsAccessor has not been renamed yet.
  • There are other renames in Vanilla code that has not been yet reflected in SpruceUI. Should those also be renamed to match the Vanilla counterpart?
  • Yumi has been left on snapshot 6; have yet run into a code path that causes a crash, but it doesn't mean it does not contain a codepath that hasn't been tested that crashes.

Copy link
Copy Markdown
Owner

@LambdAurora LambdAurora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

I definitely would:

  • do more renames to the extract*RenderState scheme, it's more accurate and can't live in the past all the time;
  • rename the GuiGraphics mixin to make it fit the new name;
  • not rename SpruceGuiGraphics because it's already quite long 😅;
  • rename methods in SpruceGuiGraphics so the pass-through methods still match GuiGraphicsExtractor so we avoid potentially confusion.

target = "Lnet/minecraft/client/gui/screens/Screen;renderWithTooltipAndSubtitles(Lnet/minecraft/client/gui/GuiGraphics;IIF)V"
target = "Lnet/minecraft/client/gui/screens/Screen;extractRenderStateWithTooltipAndSubtitles(Lnet/minecraft/client/gui/GuiGraphicsExtractor;IIF)V"
),
// FIXME: see what Neoforge names this hook.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the NeoForge signature is still the same.

https://github.com/neoforged/NeoForge/blob/7e61b8a35f1c0087ee07ca1d09db0c8452a6521a/patches/net/minecraft/client/renderer/GameRenderer.java.patch#L50

Though, it may still change which puts us in a delicate spot for now.
Arguably, it'd be much nicer if they used mixins for this. >:(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave it as-is in the meantime. Tho, saying that, the vanilla call is missing in NeoForge, so; it'll, break either way of: it's left commented out, always causing a mixin error on startup, or it's active but they changed the name mid-way through, causing a mixin error on startup then.

The render functions have been renamed to align with Vanilla's naming convention; i.e.
- render -> extractRenderState
- renderWidget -> extractWidgetRenderState
- render\* -> extract\*, foregoing the `RenderState` suffix, similar to Vanilla.
Simplifies the build setup and takes advantage of the global cache, if theh dependencies allow.
@LambdAurora LambdAurora merged commit d918236 into LambdAurora:26.1 Mar 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants